﻿using BLL.RYGL;
using Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using System.Web.Http;

namespace YQFK.api
{
    /// <summary>
    /// 首页
    /// </summary>
    public class MainController : ApiController
    {
        private readonly EmployeeBLL _employeeBLL;

        public MainController()
        {
            _employeeBLL = new EmployeeBLL();
        }


        /// <summary>
        /// 首页人员统计
        /// </summary>
        /// <param name="deptid"></param>
        /// <param name="date"></param>
        /// <returns></returns>
        public async Task<IEnumerable<MainEmployeeModel>> Get(string deptid = null, DateTime? date = null)
        {
            return await _employeeBLL.Main(deptid, date);
        }

        //// GET: api/Main/5
        //public string Get(int id)
        //{
        //    return "value";
        //}

        //// POST: api/Main
        //public void Post([FromBody]string value)
        //{
        //}

        //// PUT: api/Main/5
        //public void Put(int id, [FromBody]string value)
        //{
        //}

        //// DELETE: api/Main/5
        //public void Delete(int id)
        //{
        //}
    }
}
